<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/profil.css">
		<meta charset="UTF-8"/>
		<title>Mes biens</title>
		<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
		<script src="//code.jquery.com/jquery-1.9.1.js"></script>
		<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
		<link rel="stylesheet" href="/resources/demos/style.css">
		<script>
		$(function() {
		$( ".datepicker" ).datepicker();
		});
		</script>
	</head>

	<body>
	<div id="infos">

		<form action="modifier_bien.php" method="post">
			<table style="color:white;" border="1" width="300">
				<tr>
					<td>Ville</td>
					<td><input type="text" name="ville" id="ville" value="<?php if(isset($bien)) echo $bien['ville_nom']; ?>"/></td>
				</tr>
				<tr>
					<td>Pays</td>
					<td><input type="text" name="pays" id="pays" value="<?php if(isset($bien)) echo $bien['nom_pays']; ?>"/></td>
				</tr>
				<tr>
					<td>Dates</td>
					<td><input type="text" name="date_debut" style="width:70px;" class="datepicker" value="<?php if(isset($bien)) echo date('d-m-Y', strtotime($bien['location_dated'])); ?>">   <input type="text" style="width:70px;" name="date_fin" class="datepicker" value="<?php if(isset($bien)) echo date('d-m-Y', strtotime($bien['location_datef'])); ?>"></td>
				</tr>
				<tr>
					<td>Photo</td>
					<td><input type="text" name="photo" id="photo" value="<?php if(isset($bien)) echo $bien['location_couv']; ?>"/></td>
				</tr>
				<tr>
					<td>Surface</td>
					<td><input type="text" name="surface" id="surface" value="<?php if(isset($bien)) echo $bien['location_surface']; ?>"/></td>
				</tr>
				<tr>
					<td>Prix à la semaine</td>
					<td><input type="text" name="prixs" id="prixs" value="<?php if(isset($bien)) echo $bien['location_tarifj']; ?>"/></td>
				</tr>
				<tr>
					<td>Prix à la journée</td>
					<td><input type="text" name="prixj" id="prixj" value="<?php if(isset($bien)) echo $bien['location_tarifh']; ?>"/></td>
				</tr>
				<tr>
					<td>Adresse</td>
					<td><input type="text" name="adresse" id="adresse" value="<?php if(isset($bien)) echo $bien['location_voie']; ?>"/></td>
				</tr>
				<tr>
					<td>Description</td>
					<td><input type="text" name="description" id="description" value="<?php if(isset($bien)) echo $bien['location_desc']; ?>"/></td>
					<input type="hidden" name="location_id" value="<?php if(isset($bien)) echo $bien['location_id']; ?>"/>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<input type="submit" name="modifier" value ="Modifier" />
					</td>
				</tr>
			</table>
						
		</form>
		
	</div>
	</body>
</html>
